package com.ysq.www.api.work.controller;


import com.ysq.www.api.work.entity.Apply;
import com.ysq.www.api.work.service.IApplyService;
import com.ysq.www.common.annotation.AuthToken;
import com.ysq.www.common.result.ResultMsg;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 入会申请表 前端控制器
 * </p>
 *
 * @author dql
 * @since 2020-08-11
 */
@RestController
@RequestMapping("/work/apply")
public class ApplyController {

    @Autowired
    private IApplyService applyService;

    /**
     * 提交入会申请表
     * @param apply
     * @return
     */
    @PostMapping("/add")
    @AuthToken
    public ResultMsg add(@RequestBody Apply apply){
        ResultMsg rm = applyService.addApply(apply);
        return rm;
    }

}
